package com.antdesignbackend.backend.service.impl;

import com.antdesignbackend.backend.entity.Purchase;
import com.antdesignbackend.backend.entity.entityVo.PurchaseVo;
import com.antdesignbackend.backend.mapper.PurchaseMapper;
import com.antdesignbackend.backend.service.PurchaseService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase> implements PurchaseService {
    @Autowired
    PurchaseMapper purchaseMapper;
    @Override
    public List<PurchaseVo> search(QueryWrapper<PurchaseVo> queryWrapper, Page<PurchaseVo> page) {
        return purchaseMapper.search(queryWrapper,page);
    }

    @Override
    public Integer count(QueryWrapper<PurchaseVo> queryWrapper) {
        return purchaseMapper.count(queryWrapper);
    }
}
